package leetcode_1701_1800;

import java.util.Comparator;
import java.util.PriorityQueue;

public class LeeCode_1753 {
    public static void main(String[] args) {

    }
    private static int maximumScore(int a, int b, int c) {
        PriorityQueue<Integer> queue = new PriorityQueue<>((o1, o2) -> o2 - o1);
        queue.add(a);
        queue.add(b);
        queue.add(c);
        int ans = 0;
        for(;;){
            int n1 = queue.poll(), n2 = queue.poll();
            if (n2 == 0)
                break;
            n1--;
            n2--;
            ans++;
            queue.add(n1);
            queue.add(n2);
        }
        return ans;
    }
}
